namespace go user

struct User{
    1: optional i64 id (api.body="id",api.query="id");
    2: optional string name (api.body="name",api.form="name");
    3: optional string password (api.body="password",api.form="password");
    4: optional string role (api.body="role");
}

service UserService{
    bool addUser(1: User user)  (api.post="/user")
    bool deleteUser(1: i64 id)  (api.delete="/user")
    bool editUser(1: User user)  (api.put="/user")
    User getUserInfo(1: User user) (api.get="/user")
    list<User> getUserList(1: i64 offset, 2: i64 limit) (api.patch="/user")
}